package lq16989;

import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        // 环形排列的n个灯笼
        // 谜底为相邻两个灯笼上的数字之和
        // 首尾两个灯笼同样相连
        // a1=a2+an,a2=a1+a3,...,an=an-1+a1;
        // 除首尾之外，a[i]=a[i-1]+a[i+1];
        int n = sc.nextInt();
        int[] arr = new int[n];
        for (int i = 0; i < n; i++) {
            arr[i] = sc.nextInt();
        }

        for (int i = 0; i < n; i++) {
            if (i != 0 && i != n-1) {
                System.out.print(arr[i - 1] + arr[i + 1] + " ");
            } else {
                if (i == 0)
                    System.out.print(arr[n-1] + arr[i + 1] + " ");
                else // n的时候
                    System.out.print(arr[n - 2] + arr[0] + " ");
            }
        }
        sc.close();
    }
}